#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>


void InsertSort(int* a, int n)
{

	for (int i = 0; i < n; i++)
	{
		int end = i;
		while (end > 0)
		{
			
			if (a[end] < a[end - 1])
			{
				int tmp = a[end];
				a[end] = a[end - 1];
				a[end - 1] = tmp;
				--end;
			}
			else
				break;

		}
	}
}



int main()
{
	int a[] = {2,5,6,5,1,9,10,90,0,0,10 };
	InsertSort(a, sizeof(a) / sizeof(int));

	for (int i = 0; i < sizeof(a) / sizeof(int); i++)
	{
		printf("%d ", a[i]);
	}

	return 0;
}